package o;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.huawei.appgallery.appcomment.impl.bean.DeleteReplyResBean;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;
import java.lang.ref.WeakReference;
import o.bcg.h;

public class bdv implements IServerCallBack {
    private WeakReference<Context> ˊ;
    private String ˏ;

    public bdv(String str, Context context) {
        this.ˏ = str;
        this.ˊ = new WeakReference(context);
    }

    public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
    }

    public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
        String str = "";
        Context context = (Context) this.ˊ.get();
        if (context != null) {
            CharSequence string;
            if (!(responseBean instanceof DeleteReplyResBean) || responseBean.getResponseCode() != 0) {
                string = context.getString(h.ॱﾟ);
            } else if (responseBean.getRtnCode_() == 0) {
                String string2 = context.getString(h.ͺˎ);
                Intent intent = new Intent("com.huawei.appmarket.service.broadcast.ReplyDeleted");
                intent.putExtra("ACTION_PARAM_REPLY_DEL_TYPE_REPLYID", this.ˏ);
                ll.ˏ(context).ˋ(intent);
                bcb.ˋ.ˋ("DeleteReplyStoreCallBack", "delete comment success!");
                string = string2;
            } else if (responseBean.getRtnCode_() == 1) {
                string = context.getString(h.ˏͺ);
            } else if (responseBean.getRtnCode_() == 2) {
                string = context.getString(h.ˏͺ);
                bcb.ˋ.ˋ("DeleteReplyStoreCallBack", "delete comment ST fail");
            } else {
                string = context.getString(h.ˏͺ);
            }
            if (!TextUtils.isEmpty(string)) {
                ckv.ˎ(string, 0);
            }
        }
    }
}
